<div id="container">
    <div class="clear"></div>
    <?php
    switch($pageid) {
        case "3"; //webdesign
            ?>
    <div id="showreal">
        <div id="portintro">
            <p class="nomarg">3D graphic of the Saton Optiek stationary</p>
        </div>
        <img src="<?php print(DATA_PATH); ?>/images/portfolio/pagepics/pagepic_saton.jpg" alt="Saton" />
    </div>
            <?php
            break;
    }
    switch($pageid) {
        default;
            ?>
    <div id="posts">
                <?php
                break;

            case "1"; //home
            case "201"; //archive
                ?>
        <div id="main_page">
                    <?php
                    break;
                case "4"; //wallpapers
                case "4000"; //wallpapers
                    break;
            }

            switch($pageid) {

                default;
                    include($objects_path.'/pageFetcher.obj.php');

                    switch($pageid) {
                        case "3"; //webdesign
                            include($plugins_path.'/thumbBox/portfolio.php');
                            break;
                        case "4"; //wallpapers
                            include($objects_path.'/albumFetcher.obj.php');
                            break;
                        case "4000"; //wallpapers
                            include($plugins_path.'/thumbBox/wallpapers.php');
                            break;
                        case "503"; //contact
                        case "701"; //login
                        case "702"; //signup
                            include($objects_path.'/formSelector.php');
                            break;
                    }
                    break;

                case "1"; //home
                    include($objects_path.'/mainItems.obj.php');
                    include($objects_path.'/postTable.obj.php');
                    print('<div class="clear"></div>');
                    print('<div class="widgetBox">');
                    print('<h3>Poll</h3>');
                    include($objects_path.'/poll.obj.php');
                    print('</div>');
                    break;

                case "2"; //news
                    if(empty($article)) {
                        include($objects_path.'/newsDetails.obj.php');
                    }
                    elseif(!empty($article)) {
                        include($objects_path.'/postDetails.obj.php');
                    }
                    break;

                case "7"; //profile
                    include($objects_path.'/profileDetails.obj.php');
                    break;

                case "201"; //archive
                    include($objects_path.'/postTable.obj.php');
                    break;

                case "8"; //admin
                    if($_SESSION['adminrights'] == "true") {
                        include($includes_path.'/admin.inc.php');
                    }
                    break;

                case "90"; //userposts
                    include($objects_path.'/showComments.obj.php');
                    break;

                case "40"; //osinfo
                    include($objects_path.'/osInfo.obj.php');
                    break;

                case "200"; //results
                    include($objects_path.'/searchResults.obj.php');
                    break;
            }
            ?>
        </div>

        <?php
        switch($pageid) {
            default;
                print('<div id="toolbar">');
                include($objects_path.'/toolbar.obj.php');
                print('</div>');
                break;
            case "8"; //admin
                if($_SESSION['adminrights'] == true) {
                    print('<div id="adminbar">');
                    include($objects_path.'/adminbar.obj.php');
                    print('</div>');
                }
                break;
            case "1"; //home
            case "201"; //archive
                print('<div id="sidebar">');
                include($objects_path.'/sidebar.obj.php');
                print('</div>');
                break;
            case "4"; //wallpapers
            case "4000"; //wallpapers
                break;
        }
        ?>

        <div class="clear"></div>

        <?php
        if($pageid == "2" && !empty($article)) {
            print('<div id="comment_container">');
            include($objects_path.'/showComments.obj.php');
            if($_SESSION['username'] == true) {
                include($objects_path.'/form.comments.php');
            }
            else {
                ?>
        <p>You need to <a href="page/6/login" title="Go to login page">login</a> in order to respond</p>
            <?php
            }
            print('</div>');
        }
        ?>
    </div>
